package com.deepoove;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.alibaba.fastjson.serializer.SerializeConfig;
import lombok.Builder;
import lombok.Data;

/**
 * @Description:
 * @Author: zjy
 * @Date: 2025/3/10 16:09
 */
@Data
@Builder
public class FillDataDTO {

    // contract_number
    private String contractNumber;

    // creditor_name
    private String creditorName;

    // creditor_address
    private String creditorAddress;

    // creditor_person
    private String creditorPerson;

    // company_name
    private String companyName;

    // guaranteed_address
    private String guaranteedAddress;

    // guaranteed_name
    private String guaranteedName;

    // project_name
    private String projectName;

    // date_format
    private String dateFormat;

    /**
     * 将对象转换为下划线形式的 JSON 字符串
     *
     * @return 转换后的 JSON 字符串
     */
    public String toSnakeCaseJson() {
        SerializeConfig config = new SerializeConfig();
        config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;

        return JSON.toJSONString(this, config);
    }

}
